import request from "@/utils/request";

let prefix = ''
// 数据资源
export function dataResourceUpdate(data) {
  return request({
    url: prefix + "/dataResource/update",
    method: "post",
    data
  });
}

export function dataResourceAdd(data) {
  return request({
    url: prefix + "/dataResource/add",
    method: "post",
    data
  });
}

export function dataResourcePage(param) {
  return request({
    url: prefix + "/dataResource/queryByPage",
    method: "post",
    data: param
  });
}
export function dataResourceDetail(data) {
  return request({
    url: prefix + "/dataResource/getById",
    method: "get",
    params: data
  });
}
export function dataResourceDelete(data) {
  return request({
    url: prefix + `/dataResource/delete`,
    method: "delete",
    params: data
  });
}

// 数据目录树
export function dataCatalogUpdate(data) {
  return request({
    url: prefix + `/dataCatalog/update`,
    method: "post",
    data
  });
}

export function dataCatalogTree(data) {
  return request({
    url: prefix + `/dataCatalog/tree`,
    method: "get",
    data
  });
}

export function dataCatalogAdd(data) {
  return request({
    url: prefix + `/dataCatalog/add`,
    method: "post",
    data
  });
}

export function dataCatalogDetail(data) {
  return request({
    url: prefix + `/dataCatalog/getById`,
    method: "get",
    params: data
  });
}

export function dataCatalogDelete(id) {
  return request({
    url: prefix + `/dataCatalog/delete/` + id,
    method: "delete",
  });
}